QiyuFrameSource Class

Description

A custom frame source which connects Qiyu output to EasyAR input in the scene, providing Qiyu support using custom camera feature of EasyAR Sense.

This frame source is one type of motion tracking device, and will output motion data in a ARSession .

Qiyu Unity XR SDK is required to use this frame source, you need to setup Qiyu Unity XR SDK according to official documents.

XROriginBasedFrameSource.XROrigin (or CompatibleVROriginFrameSource.XRRig ) is required for availability check, they will be automatically picked from scene objects if not setup.


MonoBehaviour Messages

private void Update()

protected override void OnDestroy()

protected override void Awake()

protected virtual void OnApplicationPause(bool pause)

protected virtual void OnEnable()

protected virtual void OnDisable()


Fields

ControlSeeThrough

C#

public bool ControlSeeThrough

Control see through or not. Make sure to set before ARSession .Start if you want to turn it off for the whole life cycle.


Properties

IsAvailable

C#

public override Optional<bool> IsAvailable { get; }

If the frame source is available.

If the value equals null, FrameSource.CheckAvailability must be called and the value can be accessed after Coroutine finish. This property is used by ARComponentPicker when picking frame source.

XRRig

C#

public UnityEngine.XR.Interaction.Toolkit.XRRig XRRig { get; set; }

XR Rig.

Origin

C#

public override GameObject Origin { get; }

Origin of ARSession if the frame source can output motion tracking data.

Each type of motion tracking frame source has its own method to set the origin object containing some specific component. Some frame source will automatic pick a usable object from active objects in the scene or generate an object if the value is not set.

XROrigin

C#

public Unity.XR.CoreUtils.XROrigin XROrigin { get; set; }

XR Origin.

AvailableCenterMode

C#

public override IReadOnlyList< ARSession.ARCenterMode > AvailableCenterMode { get; }

Available center mode of the frame source.

ReceivedFrameCount

C#

public int ReceivedFrameCount { get; protected set; }

Received frame count from device. Usually used for debug. There are usually hardware issues if this value stop to increase, and re-plug may help when using some devices like Nreal.

Camera

C#

public virtual Camera Camera { get; set; }

Camera used by the frame source in an ARSession .

Each type of frame source has its own method to check if the camera is usable, and will reject value set if the camera is not usable by the frame source. This property is used by ARComponentPicker when picking frame source to determine if the frame source is available, and some frame source will automatic pick a usable Camera from active objects in the scene in the process if the value is not set. You can set this value to a usable Camera before session start. The value cannot be changed after ARSession is ready if the frame source is selected in the session.


Methods

CheckAvailability

C#

public override System.Collections.IEnumerator CheckAvailability()

Coroutine to check frame source availability when FrameSource.IsAvailable equals null.